package go_common

import "time"
// 字符串转化成mytime类型
func TransTime(t string, format string) MyTime {
	t1,_ := time.ParseInLocation(format, t, time.Local)
	return MyTime{Time:t1}
}
//字符串转化成mytime类型
func Trans2Time(str string,format string) time.Time {
	t, _ := time.ParseInLocation(format, str, time.Local)
	return t
}
// 获取时间字符串
func GetTimeString(t time.Time, format string) string {
	return time.Unix(t.Unix(), 0).Format(format)
}